local utils = require "astrocore"
return {
  -- {
  --   "b0o/SchemaStore.nvim",
  --   lazy = true,
  --   dependencies = {
  --     {
  --       "AstroNvim/astrolsp",
  --       ---@type AstroLSPOpts
  --       opts = {
  --         ---@diagnostic disable: missing-fields
  --         config = {
  --           jsonls = {
  --             on_new_config = function(config)
  --               if not config.settings.json.schemas then config.settings.json.schemas = {} end
  --               vim.list_extend(config.settings.json.schemas, require("schemastore").json.schemas())
  --             end,
  --             settings = { json = { validate = { enable = true } } },
  --           },
  --         },
  --       },
  --     },
  --   },
  -- },
  {
    "nvim-treesitter/nvim-treesitter",
    optional = true,
    opts = function(_, opts)
      if opts.ensure_installed ~= "all" then
        opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "json", "jsonc" })
      end
    end,
  },
  {
    "williamboman/mason-lspconfig.nvim",
    optional = true,
    opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "jsonls" }) end,
  },
  {
    "jay-babu/mason-null-ls.nvim",
    optional = true,
    opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "prettier" }) end,
  },
}
